<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:replace="dashboard/header :: header"></head>
<body>

<!--
@desc 短信模板 更新
@author WeiXiaoJin
@since 2020-01-20 12:02:03
-->

	<div layout:fragment="content">
		<div class="container-fluid content-main">
			<div class="animated fadeIn">
				<div class="row">
					<div class="col-sm-12">
						<div class="card">
							<div class="card-body">

								<form class="form-horizontal" id="modifyForm">

									<input type="hidden" name="id" th:value="${bean.id}" />
									
<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">模板代码 </label>
	<div class="col-md-9">
				<input class="form-control" id="templateCode" type="text" th:value="${ bean.templateCode}" name="templateCode" placeholder="模板代码">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">模板内容 </label>
	<div class="col-md-9">
				<input class="form-control" id="templateContent" type="text" th:value="${ bean.templateContent}" name="templateContent" placeholder="模板内容">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">模板描述 </label>
	<div class="col-md-9">
				<input class="form-control" id="templateDesc" type="text" th:value="${ bean.templateDesc}" name="templateDesc" placeholder="模板描述">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">模板类型 </label>
	<div class="col-md-9">
				<input class="form-control" id="templateType" type="text" th:value="${ bean.templateType}" name="templateType" placeholder="模板类型">
			</div>
</div>
																				</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<footer th:replace="dashboard/footer :: footer"></footer>

	<script type="text/javascript">
		var modifyForm = $("#modifyForm") ; 
		$(function(){
			addForm.validate({
				ignore: [],  
				rules: {
templateCode: {required:true}
,templateContent: {required:true}
,templateDesc: {required:true}
,templateType: {required:true}
				}
			});
		}) ;

		function submitHandler() {
			var result = $.validate.form("modifyForm");
			if(result){	
				var modifyUrl = ctx+"base/notice/smsTemplate/update" ;
				$.operate.save(modifyUrl , modifyForm.serialize());
			}
	    }
	</script>
</body>
</html>
